1. Field of the Invention
The invention relates to an autofocus device of a camera and method that enables highly accurate prediction tracking of objects moving with a high velocity, which have been difficult to focus until now. Moreover, focus precision is constantly obtained even when unstable motion due to the effects of fluctuation in autofocus detection of acceleration values are present.
2. Description of Related Art
There is a movement in the industry to make some acceleration corrections in addition to linearly predicting the change in position of the object image composition plane with the lens focused on infinite distance (hereafter "image plane position") for a moving object, especially for an object moving with a high velocity for which the time required for autofocus in a camera becomes critical. It is well known that, even when an object is in uniform motion, the behavior of the image plane cannot be expressed linearly corresponding to the motion. If, by chance, the motion of the image plane is guaranteed to be a linear motion like the motion of the object, a linear prediction method such as extrapolation of the past defocus amount data clearly results in sufficient accuracy.
Suppose an object is approaching the camera with a constant speed V and passing the vicinity of the camera at a distance h. The image plane position of the object is expressed in formula 1 below where f denotes the focal distance of the shooting lens. ##EQU1##
A graph of the formula plotted with the image plane versus time is a curve with a peak as illustrated in FIG. 1. The curve illustrated is an example of motion of an object moving with a speed of 80 km/h in which the closest point to the camera with focal length 400 mm is 10 m. The height of the peak and the condition of change of the slope depend on the focal distance of the lens, the velocity of the object, and the closest point of the object to the camera.
The simplest example of tracking motion or predicted driving is a method in which the image plane velocity is evaluated and extended; in other words, a method in which the future position of the object is predicted by extending a tangent line at a certain position to the function describing the image plane position. Of course, this method of predicted driving is well known (for example, Japanese Unexamined Laid-Open Patent Publication No. 63-14218) and is widely used today. In this method, is at least the lens is simply driven to the measured position without tracking. Compared to focusing motion methods in the past, this method has produced fairly good results for focusing on a moving body.
However, speaking from the point of view of predicting target position more precisely, the tracking of such a method is nothing more than approximating locally using a linear equation or line segments. It is intuitively clear from the characteristics of the curve that this method contains a certain amount of error existing between the positions of the predicted image plane and the actual image plane. An approximation function replacing the linear equation is needed since better tracking is induced by better fitting of the curve to the tracking curve.
If the tracking prediction by a simple linear approximation is not sufficient, then a different course of action must be taken. One answer to this problem is to evaluate the acceleration component of the image plane, or, in other words, an idea in which the velocity change is predicted linearly by studying the second derivative coefficients of the curve to obtain a closer approximation.
One example of this idea is disclosed in Japanese Patent Publication No. 1-285908. In this example, a quadratic equation is determined from three image plane positions, the current position, the position one moment before, and the position two moments before, and the respective times of the three positions. EQU y=at.sup.2 +bt+c (2)
A target position is predicted by substituting the future time t, for the time variable t in this function. Without much effort, one can clearly see that this method predicts the target image plane position by evaluating the image plane acceleration and by extending the velocity linearly into the future. This is because evaluation of the velocity as a linear function causes the function used to describe the image plane position to become a quadratic function.
However, the above-described conventional autofocus adjustment device has the following problems.
The first problem is caused by the use of a quadratic function. It is true that use of a quadratic function improves prediction accuracy over the linear prediction method, but because the image plane position is a reciprocal type function, described by formula 1, approximation by a parabola could not have a more significant probability than the approximation of the image plane position function by a curve instead of a line. In other words, because an image plane position function is a reciprocal type function, the velocity and the acceleration of the image plane become higher order reciprocal type functions, which is characteristic of a reciprocal type function; hence, a simple linear approximation of the functions obtained by differentiating the original function does not agree with the actual conditions. Even if efforts are made to interpret in line with the actual function, since f in the denominator of formula 1 is small enough to be neglected compared to the other terms, the image plane velocity and the acceleration can be obtained as follows. By making the value of h small, these functions become reciprocal functions of a higher order as the order of differentiation becomes higher from the velocity to the acceleration. ##EQU2##
To express the characteristics described above practically, the curvature increases as the curve gets closer to the center. In other words, the non-linear nature of the change in the acceleration becomes more significant. Thus, it can be concluded that a method to approximate a curve with such characteristics is not a preferred method. Since a parabola assumes that there is no change in the acceleration and that change in the velocity is linear, it is difficult to use a parabola over a gradient surface of the peak where change is very rapid.
Thus, various methods of approximating motion of the image plane corresponding to the uniform motion of an object have been tried without complete success. There should be a method more conducive to the actual conditions than the simple application and linear extension of second derivative coefficients obtained by non-advanced mathematics. A better method of approximation needs to be developed, especially around the gradient surface of the peak, though the peak itself and the very small neighborhood of the peak are not as critical.
The second problem in correctly predicting the image plane movement is as follows.
The output of defocus amounts from the autofocus detection equipment contains an error, which causes significant effects on computation of the acceleration and the velocity based on the output. In the case of a system such as the autofocus of a camera, the evaluation of the velocity and the acceleration is not normally obtained continuously, but rather is obtained by taking the differences between discrete data obtained intermittently. Because these discrete data contain fluctuations, if the velocity is 0 or if there is no change in the velocity, the difference between the data naturally represents only the fluctuations. The ratio of the error to the data increases with the order of the difference, causing the level of confidence of the data thus obtained to decrease. Even if much consideration is given to acceleration in predicting the image plane position and the image plane velocity, if the results lack a level of confidence or simply magnify the fluctuations of measured values, the true purpose of the correction itself is subverted. In determining velocity and acceleration, a method must be developed in which the fluctuations accompanying measurement are eliminated as much as possible.